package org.compiere.dsr;

public class DSR_Cell 
{
	private String columnName = "";
	private String rowName = "";
	private String value = null;
	public String Formula = "";
	
	private int BPM_FormLine_ID = 0;
	private int BPM_FormColumn_ID = 0;
	private int BPM_FormCell_ID = 0;
	
	public boolean isHeader = false;
	public boolean isRow = false;
	
	public int LevelIndex = 0;
	
	public String DataType = "";
	
	public short Alignment = 0;
	public short VerticalAlignment = 0;
	public boolean isBold = true;
	
	public DSR_Cell(String columnName, String rowName, String value)
	{
		this.columnName = columnName;
		this.rowName = rowName;
		this.value = value;
	}
	
	private String getColumnName() 
	{
		return columnName;
	}

	private String getRowName() 
	{
		return rowName;
	}
	
	public String getValue() 
	{
		if(isHeader)
			return getColumnName();
		else if(isRow)
			return getRowName();
		else if ("".equals(value))
			return "0";
		else
			return value;
	}

	public void setValue(String value) 
	{
		this.value = value;
	}
	
	public String toString()
	{
		return getValue().toString();
	}

	public void setHeader(boolean isHeader) 
	{
		this.isHeader = isHeader;
	}

	public void setRow(boolean isRow) 
	{
		this.isRow = isRow;
	}

	public int getBPM_FormLine_ID() {
		return BPM_FormLine_ID;
	}

	public void setBPM_FormLine_ID(int bPM_FormLine_ID) {
		BPM_FormLine_ID = bPM_FormLine_ID;
	}

	public int getBPM_FormColumn_ID() {
		return BPM_FormColumn_ID;
	}

	public void setBPM_FormColumn_ID(int bPM_FormColumn_ID) {
		BPM_FormColumn_ID = bPM_FormColumn_ID;
	}

	public int getBPM_FormCell_ID() {
		return BPM_FormCell_ID;
	}

	public void setBPM_FormCell_ID(int bPM_FormCell_ID) {
		BPM_FormCell_ID = bPM_FormCell_ID;
	}

	public String getFormula() 
	{
		return Formula;
	}
	
}
